<div class="layuimini-container">
    <form id="app-form" class="layui-form layuimini-form">
 
        <div class="layui-form-item">
            <label class="layui-form-label">商品名称</label>
            <div class="layui-input-block">
                <input type="text" name="name" class="layui-input" lay-verify="required" placeholder="请输入商品名称" value="{$row.name|default=''}">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">所属分类</label>
            <div class="layui-input-block">
                <select name="cid" lay-verify="" lay-search>
                    {foreach name="category" item="val"}
                    <option value="{$val.id}" {if condition="$row.cid eq $val.id"}selected="" {/if}>{$val.name}</option>
                    {/foreach}
                </select>     
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">初始价格</label>
            <div class="layui-input-block">
                <input type="text" name="base_price" class="layui-input" lay-verify="required" placeholder="请输入初始价格" value="{$row.base_price|default=''}">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">真实价格</label>
            <div class="layui-input-block">
                <input type="text" name="price" class="layui-input" lay-verify="required" placeholder="请输入真实价格" value="{$row.price|default=''}">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">商品短描述</label>
            <div class="layui-input-block">
                <input type="text" name="summary" class="layui-input" lay-verify="required" placeholder="请输入商品短描述" value="{$row.summary|default=''}">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">商品详情</label>
            <div class="layui-input-block">
                <input type="text" name="description" class="layui-textarea" placeholder="请输入商品详情" value="{$row.description|default=''}">
            </div>
        </div>
        
        <div class="layui-form-item">
            <label class="layui-form-label required">商品图片</label>
            <div class="layui-input-block layuimini-upload">
                <input name="img" class="layui-input layui-col-xs6" lay-verify="required" placeholder="请上传商品图片" value="{$row.img|default=''}">
                <div class="layuimini-upload-btn">
                    <span><a class="layui-btn" data-upload="img" data-upload-number="three" data-upload-exts="png|jpg|ico|jpeg|webp|tif|tiff" data-upload-icon="image"><i class="fa fa-upload"></i> 上传</a></span>
                    <span><a class="layui-btn layui-btn-normal" id="select_img" data-upload-select="img" data-upload-number="three" data-upload-mimetype="image/*"><i class="fa fa-list"></i> 选择</a></span>
                </div>
            </div>
        </div>
  
        <div class="layui-form-item">
            <label class="layui-form-label">商品状态</label>
            <div class="layui-input-block">
                <select name="state" lay-verify="" lay-search>
                    <option value="0" {if condition="$row.state eq 0"}selected="" {/if}>未上架</option>
                    <option value="1" {if condition="$row.state eq 1"}selected="" {/if}>已上架</option>
                    <option value="2" {if condition="$row.state eq 2"}selected="" {/if}>待支付</option>
                    <option value="3" {if condition="$row.state eq 3"}selected="" {/if}>已支付</option>
                    <option value="4" {if condition="$row.state eq 4"}selected="" {/if}>已确认</option>
                    <option value="5" {if condition="$row.state eq 5"}selected="" {/if}>待解决</option>
                    <option value="6" {if condition="$row.state eq 6"}selected="" {/if}>已提货</option>
                    <option value="7" {if condition="$row.state eq 7"}selected="" {/if}>已发货</option>
                </select>     
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">抢购场次</label>
            <div class="layui-input-block">
                <select name="sid" lay-verify="" lay-search>
                    {foreach name="schedule" item="sch"}
                    <option value="{$sch.id}" {if condition="$row.sid eq $sch.id"}selected="" {/if}>{$sch.name}（{$sch.bucket_name}）</option>
                    {/foreach}
                </select>     
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">商品所属人</label>
            <div class="layui-input-block">
                <select name="belong" lay-verify="" lay-search>
                    {foreach name="belong" item="be"}
                    <option value="{$be.id}" {if condition="$row.belong eq $be.id"}selected="" {/if}>{$be.nickname}（{$be.phone}）</option>
                    {/foreach}
                </select>     
            </div>
        </div>
        <div class="hr-line"></div>
        <div class="layui-form-item text-center">
            <button type="submit" class="layui-btn layui-btn-normal layui-btn-sm" lay-submit>确认</button>
            <button type="reset" class="layui-btn layui-btn-primary layui-btn-sm">重置</button>
        </div>

    </form>
</div>